<!--#include file="common/header.html"-->
<body>
    <div class="container-fluid larry-wrapper">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <!--头部搜索-->
                <section class="panel panel-padding">
                    <form class="layui-form" action="/education/admin/messageRead">
                        <input type="hidden" name="messageId" id="rId">
                        <div class="layui-form">
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input class="layui-input" name="_query.keyword" placeholder="关键字">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button lay-submit class="layui-btn" lay-filter="search" id="search">查找</button>
                            </div>
                        </div>
                    </form>
                </section>

                <!--列表-->
                <section class="panel panel-padding">
                    <div id="list" class="layui-form"></div>
                    <div class="text-right" id="page"></div>
                </section>
            </div>
        </div>
    </div>
    <!-- <th width="130"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check"
                               lay-skin="primary"> </th> -->
    <script id="list-tpl" type="text/html"
            data-params='{"url":"/education/admin/messageRead","dataName":"messageReadData","pageid":"#page", "method":"post", "data":"", "async":false}'>
        <table id="example" class="layui-table lay-even" data-name="messageReadData" data-tplid="list-tpl">
            <thead>
            <tr>
                <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check"
                                      lay-skin="primary"></th>
                <th>签收人</th>
                <th>签收时间</th>
            </tr>
            </thead>
            <tbody>
            {{# layui.each(d.list, function(index, item){ }}
            <tr>
                <td><input type="checkbox" name="checkbox" value="{{ item.id}}"
                           lay-skin="primary"></td>
                <td>{{ item.username||'' }}</td>
                <td>{{ item.read_time ||'' }}</td>
            </tr>
            {{# }); }}
            </tbody>
        </table>
    </script>

</body>
<script src="../js/layui/layui.js"></script>
<script type="text/javascript" src="../js/lib/jquery-1.11.2.min.js"></script>
<!--#include file="common/version.html"-->
<script>
    layui.use(['jquery', 'dtable', 'jqdate', 'jqform', 'upload'], function(exports) {
        var $ = layui.jquery,
                list = layui.dtable,
                ajax = layui.ajax,
                laydate = layui.laydate,
                form = layui.jqform,
                oneList = new list();
        $('#rId').val(msgId);
        var p =$('#list-tpl').data('params');
        p.data = 'messageId='+msgId;
        $('#list-tpl').data('params', JSON.stringify(p));
        oneList.init('list-tpl');
    });


    var msgId = getQueryString('msgId');
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    }

</script>

</html>